package request

type AlibabaSscSupplyplatformServicecapacitySaveRequest struct {
	/*
	   目前支持两种。daily 每天容量相同；customize 定制容量，每天都不同     */
	Mode *string `json:"mode" required:"true" `
	/*
	   目前支持两种。day 表示支持的时间粒度为天；hour 时间粒度为小时     */
	TimeInterval *string `json:"time_interval" required:"true" `
	/*
	   容量数据。根据mode和time interval有不同的格式。具体格式见业务对接文档。     */
	CapacityData *string `json:"capacity_data,omitempty" required:"false" `
	/*
	   服务提供者id。根据服务提供者类型填写相应的id，例如类型是网点，则填我们系统的网点id     */
	ProviderId *int64 `json:"provider_id,omitempty" required:"false" `
	/*
	   服务提供者类型。service_store 网点；worker 工人；supplier 服务商     */
	ProviderType *string `json:"provider_type" required:"true" `
	/*
	   网点编码     */
	ProviderCode *string `json:"provider_code,omitempty" required:"false" `
}

func (s *AlibabaSscSupplyplatformServicecapacitySaveRequest) SetMode(v string) *AlibabaSscSupplyplatformServicecapacitySaveRequest {
	s.Mode = &v
	return s
}
func (s *AlibabaSscSupplyplatformServicecapacitySaveRequest) SetTimeInterval(v string) *AlibabaSscSupplyplatformServicecapacitySaveRequest {
	s.TimeInterval = &v
	return s
}
func (s *AlibabaSscSupplyplatformServicecapacitySaveRequest) SetCapacityData(v string) *AlibabaSscSupplyplatformServicecapacitySaveRequest {
	s.CapacityData = &v
	return s
}
func (s *AlibabaSscSupplyplatformServicecapacitySaveRequest) SetProviderId(v int64) *AlibabaSscSupplyplatformServicecapacitySaveRequest {
	s.ProviderId = &v
	return s
}
func (s *AlibabaSscSupplyplatformServicecapacitySaveRequest) SetProviderType(v string) *AlibabaSscSupplyplatformServicecapacitySaveRequest {
	s.ProviderType = &v
	return s
}
func (s *AlibabaSscSupplyplatformServicecapacitySaveRequest) SetProviderCode(v string) *AlibabaSscSupplyplatformServicecapacitySaveRequest {
	s.ProviderCode = &v
	return s
}

func (req *AlibabaSscSupplyplatformServicecapacitySaveRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.Mode != nil {
		paramMap["mode"] = *req.Mode
	}
	if req.TimeInterval != nil {
		paramMap["time_interval"] = *req.TimeInterval
	}
	if req.CapacityData != nil {
		paramMap["capacity_data"] = *req.CapacityData
	}
	if req.ProviderId != nil {
		paramMap["provider_id"] = *req.ProviderId
	}
	if req.ProviderType != nil {
		paramMap["provider_type"] = *req.ProviderType
	}
	if req.ProviderCode != nil {
		paramMap["provider_code"] = *req.ProviderCode
	}
	return paramMap
}

func (req *AlibabaSscSupplyplatformServicecapacitySaveRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
